/* :root根伪类,可以定义css属性变量,方便重复使用,使用时用var()调用 */
:root{
    --white:#e9e9e9;
    --gray:#333;
    --blue:#0367a6;
    --lightblue:#008997;

    --button-radius:0.7rem;
    --max-width:758px;
    --max-height:420px;

    font-size: 16px;
    /* font-family: -apple-system; */
}
body{
    display: grid;
    align-items: center;
    height: 100vh;
    place-items: center;
    background-color: var(--white);
    background: url(../images/tiger.jpg) no-repeat center;
    background-size: cover;
    background-attachment: fixed;
}
.container{
    overflow: hidden;
    position: relative;
    background-color: var(--white);
    border-radius: var(--button-radius);
    box-shadow: 0 0.9rem 1.7rem rgba(0,0,0,.5);
    height: var(--max-height);
    max-width: var(--max-width);
    width: 100%;
}
.link{
    color: var(--gray);
    font-size: 18px;
    margin: 30px 0;
    text-decoration: none;
}
.container-form{
    height: 100%;
    position: absolute;
    top: 0;
    transition: all 0.6s ease-in-out;
}
.container-signin{
left: 0;
width: 50%;
z-index: 2;
}
.container.right-panel-active .container-signin{
    transform: translateX(100%);
}
.container-signup{
    left: 0;
    width: 50%;
    z-index: 1;
    opacity: 0;
    }
    .container.right-panel-active .container-signup{
        animation: show 0.6s;
        transform: translateX(100%);
        opacity: 1;
        z-index: 6;
    }
    .container-overlay{
        height: 100%;
        left: 50%;
        overflow: hidden;
        position: absolute;
        top: 0;
        transition: transform 0.6s ease-in-out;
        width: 50%;
        z-index: 100;
    }
    .container.right-panel-active .container-overlay{
        transform: translateX(-100%);
    }
    .overlay{
        background-color: var(--lightblue);
        background: url(../images/tiger.jpg) no-repeat center;
        background-attachment: fixed;
        background-size: cover;
        height: 100%;
        left: -100%;
        position: relative;
        transform: translateX(0);
        transition: transform 0.6s ease-in-out;
        width: 200%;
    }
    .container.right-panel-active .overlay{
        transform: translateX(50%);
    }
    .overlay-panel{
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        position: absolute;
        top: 0;
        height: 100%;
        width: 50%;
        transform: translateX(0);
        transition: transform 0.6s ease-in-out;
        text-align: center;
    }
    .overlay-left{
        transform: translateX(-20%);
    }
    .container.right-panel-active .overlay-left{
        transform: translateX(0);
    }
    .overlay-right{
        right: 0;
        transform: translateX(0);
    }
    .container.right-panel-active .overlay-right{
        transform: translateX(20%);
    }
    .btn{
        background-color: var(--blue);
        background-image: linear-gradient(90deg,var(--blue)0% ,var(--lightblue) 74% );
        border-radius: 20px;
        border: 1px solid var(--blue);
        color: var(--white);
        cursor: pointer;
        font-size: 16px;
        padding: 0.9rem 4rem;
        font-weight: bold;
        letter-spacing: 0.1rem;
        text-transform: uppercase;
        transition: transform 80ms ease-in;
    }
    .form>.btn{
        margin-top: 1.5rem;
    }
    .btn:active{
        transform: scale(0.95);
    }
    .btn:focus{
        outline: none;
    }
    form{
        background-color: var(--white);
        display: flex;
        justify-content: center;
        align-items: center;
        flex-direction: column;
        padding: 0 3rem;
        height: 100%;
        text-align: center;
    }
    input{
        background-color: #fff;
        border: none;
        padding: 0.9rem 30px;
        margin: 0.5rem 0;
        width: 80%;
    }
    .inp-signinbox-username{
        position: relative;
        width: 100%;
    }
    .inp-signinbox-username::before{
        content:"\e623";
        font-family: 'iconfont' !important;
        font-size: 24px;
        font-style: normal;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        position: absolute;
        left: 7px;
        top: 17px;
    }
    .inp-signinbox-password{
        position: relative;
        width: 100%;
    }
    .inp-signinbox-password::before{
        content:"\e621";
        font-family: 'iconfont' !important;
        font-size: 24px;
        font-style: normal;
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
        position: absolute;
        left: 7px;
        top: 17px;
    }
    @keyframes show {
        0%,
        49.99%{
            opacity: 0;
            z-index: 1;
        }
        50%,
        100%{
            opacity: 1;
            z-index: 5;
        }

    }
    .layer{
        position: absolute;
        top: 100px;
        left: 50%;
        transform: translate(-50%,-50%);
        display: none;
        width: 300px;
        height: 30px;
        background-color: #008997;
        color: #fff; 
        z-index: 200;
        text-align: center;
        line-height: 30px;
    }

